<template>
  <div>
    122
    <Button @click="start">小姐姐请进来</Button><br/>
  </div>
</template>

<script>
  export default {
    created () {
    },
    methods: {
      start() {
        const { ipcRenderer } = require('electron')
        ipcRenderer.send('capture-screen')
        // const desktopCapturer =require('electron').desktopCapturer
        // desktopCapturer.getSources({ types: ['window', 'screen'] }).then(async sources => {
        //   console.log(sources);
        //   sources.forEach(item => {
        //     let imgSrc = item.thumbnail.toDataURL()
        //     console.log(imgSrc);
        //   });          
        // })
      }
    },
  }
</script>

<style lang="scss" scoped>

</style>